package com.simple.common.entity.controller;

import com.simple.common.entity.ResData;
import com.simple.common.entity.dto.pay.india.IndiaWithdrawalDto;
import com.simple.common.entity.dto.pay.india.IndiaWithdrawalQueryDto;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.io.IOException;

import static com.simple.common.entity.constant.Payment.INDIA_WITHDRAWAL_CODE;
import static com.simple.common.entity.constant.Payment.INDIA_WITHDRAWAL_QUERY_CODE;

/**
 * @author kang
 * @date 2021年01月19日 11:04
 * @description
 **/
public interface IndiaWithdrawal {

    /**
     * 印度代付
     * @param dto
     * @returnw
     * @throws IOException
     */
    @PostMapping(INDIA_WITHDRAWAL_CODE)
    default ResData withdrawal(@RequestBody IndiaWithdrawalDto dto) throws Exception {
        return ResData.error("渠道不支持");
    }


    /**
     * 查询代付交易
     * @param dto
     * @return
     * @throws IOException
     */
    @PostMapping(INDIA_WITHDRAWAL_QUERY_CODE)
    default ResData withdrawalQuery(@RequestBody IndiaWithdrawalQueryDto dto) throws IOException {
        return ResData.error("渠道不支持");
    }
}
